package com.guyaning.deyson_core.core.ui.recycler;

import java.util.LinkedHashMap;

/**
 * Created by Administrator on 2018/6/6.
 */

public class MultipleItemBeanBuilder {

    private static final LinkedHashMap<Object,Object> FIELDS = new LinkedHashMap<>();

    public MultipleItemBeanBuilder() {
        //添加之前先清空
        FIELDS.clear();
    }

    public final MultipleItemBeanBuilder setItemType(int itemType){
        FIELDS.put(MultipleFields.ITEM_TYPE,itemType);
        return this;
    }

    public final MultipleItemBeanBuilder setField(Object key,Object value){
        FIELDS.put(key,value);
        return this;
    }

    public final MultipleItemBeanBuilder setFields(LinkedHashMap<?,?> map){
        FIELDS.putAll(map);
        return this;
    }

    public MultipleItemBean build(){
        return  new MultipleItemBean(FIELDS);
    }
}
